<template>
  <el-table :data="data" border>
    <el-table-column type="index" label="序号" width="60" align="center" />
    <el-table-column prop="installer_names" label="安装人员" show-overflow-tooltip></el-table-column>
    <el-table-column prop="content" label="安装内容" show-overflow-tooltip></el-table-column>
    <el-table-column prop="fee" label="安装费用" show-overflow-tooltip>
      <template v-slot="{ row }">
        <span>{{ formatAmount(row.fee) }}</span>
      </template>
    </el-table-column>
    <el-table-column prop="address" label="安装地址" show-overflow-tooltip></el-table-column>
    <el-table-column prop="install_date" label="预期开始时间" width="120" show-overflow-tooltip>
      <template v-slot="{ row }">
        <span>{{ formatDate(row.estimate_start_date) }}</span>
      </template>
    </el-table-column>
    <el-table-column prop="install_date" label="预期完成时间" width="120" show-overflow-tooltip>
      <template v-slot="{ row }">
        <span>{{ formatDate(row.estimate_end_date) }}</span>
      </template>
    </el-table-column>
    <el-table-column prop="status" label="状态" show-overflow-tooltip>
      <template v-slot="{ row }">
        <DesignStatus :data="row"></DesignStatus>
      </template>
    </el-table-column>
    <el-table-column prop="install_date" label="安装时间" width="120" show-overflow-tooltip>
      <template v-slot="{ row }">
        <span>{{ formatDate(row.start_date) }}</span>
      </template>
    </el-table-column>
    <el-table-column label="完成时间" show-overflow-tooltip>
      <template v-slot="{ row }">
        {{ formatDate(row.complete_date) }}
      </template>
    </el-table-column>
    <el-table-column label="备注" prop="remark" show-overflow-tooltip> </el-table-column>
  </el-table>
</template>

<script lang="ts" setup name="ManufacturWorkList">
import { formatDate, formatAmount } from '/@/utils';
import DesignStatus from './design-status.vue';

defineProps({
  data: {
    type: Array,
    default: () => [],
  },
});
</script>
